package com.zoe.vhr;

import cn.hutool.extra.spring.SpringUtil;
import com.zoe.vhr.config.ProjectConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.PostConstruct;

/**
 * @Author Zoe.Zhang
 * @Date: 2021/07/25
 * @Description
 */
@SpringBootApplication
@EnableScheduling
@MapperScan(basePackages = "com.**.mapper")
public class VhrApplication {
    static ProjectConfig projectConfigInfo;

    @PostConstruct
    public void init() {
        ProjectConfig bean = SpringUtil.getBean(ProjectConfig.class);
        projectConfigInfo = bean;
    }

    public static void main(String[] args) {
        SpringApplication.run(VhrApplication.class, args);
        System.out.println("项目启动成功" + projectConfigInfo.getProjectVersion());
    }
}
